-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MNT: Use BitsAndBytesConfig as load_in_* is deprecated #1552
MNT: Use BitsAndBytesConfig as load_in_* is deprecated #1552
Conversation
Don't pass load_in_4bit or load_in_8bit to AutoModel*.from_pretrained, as it is deprecated. Instead, pass the appropriate BitsAndBytesConfig to the quantization_config argument of from_pretrained.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great clean up !
These were caused by an incorrect search and replace operation in huggingface#1552.
Several tests were using bnb_4bit_compute_type but the argument should be called bnb_4bit_compute_dtype. Now the correct name is used. This change should not affect the tests, because they were passing the default value anyway. Therefore, the fact that this argument was passed incorrectly (and thus, presumably, ignored) should not affect the results. Also, fix another incorrect argument to bnb config. These were caused by an incorrect search and replace operation in #1552.
Don't pass load_in_8bit to AutoModel.from_pretrained, instead use BitsAndBytesConfig. There was already a PR to clean this up (huggingface#1552) but a slightly later PR (huggingface#1518) re-added this usage.
Don't pass load_in_8bit to AutoModel.from_pretrained, instead use BitsAndBytesConfig. There was already a PR to clean this up (#1552) but a slightly later PR (#1518) re-added this usage. --------- Co-authored-by: Younes Belkada <[email protected]>
Don't pass
load_in_4bit
orload_in_8bit
toAutoModel*.from_pretrained
, as it is deprecated. Instead, pass the appropriateBitsAndBytesConfig
to thequantization_config
argument offrom_pretrained
.